<?php
namespace App;
use Medoo;
$database_config=array(
	'database_type' => 'mysql',
    'database_name' => 'name',
    'server' => 'localhost',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8'
);
// 获取数据库连接
function getDbConn(){
	$database = new Medoo($database_config);
	return $database;
}
//设置跨越
function setCosHeader(){
	header("Access-Control-Allow-Origin: *"); // 允许任意域名发起的跨域请求  
	header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With');  
}
